package com.ok.common.mqtt

import androidx.annotation.IntRange

data class MqttTopic(
    val topic: String,
    /**
     * Qos 服务质量.
     * Qos.0 (At most once，至多一次)
     * Qos.1 (At least once，至少一次)
     * Qos.2 (Exactly once，确保只有一次)
     */
    @IntRange(from = 0, to = 2)
    val qos: Int = 2
){

    override fun toString(): String {
        return "MqttTopic(topic='$topic', qos=$qos)"
    }
}